{% extends 'wiki/base.html' %}
{% load i18n %}
{% load wiki %}

{% block titleoptions_wiki %}
    <h5><a href="{% url wiki_list %}">{% trans "List all articles" %}</a></h5>
{% endblock %}

{% block content_wiki %}
	<h1><a href="{{ article.get_absolute_url }}" rel="bookmark">{{ article.title }}</a></h1>

	{% if not article.id %}
		<p>{% trans "This article does not exist." %}
          <a href="{% url wiki_edit article.title %}" {% trans ">Create it now</a>?" %}</p>
	{% endif %}

    {% render_content article %}

	{% if article.id %}
		{% if user.is_authenticated %}
		<a href="{% url wiki_edit article.title %}">{% trans "Edit this article" %}</a>
		|
		{% if user.is_superuser %}
                <a href="{% url wiki_article_history article.title %}">{% trans "Editing history" %}</a>
			{% endif %}
		{% endif %}
	{% else %}
		<a href="{% url wiki_edit article.title %}">{% trans "Create this article" %}</a>
	{% endif %}
{% endblock %}
